package main

import (
	"gitee.com/zoneaurora/gin_example/common"
	"gitee.com/zoneaurora/gin_example/routes"
	"github.com/gin-gonic/gin"
)

func main() {
	common.InitDB()
  db, err := common.DB().DB()
  if err != nil {
    panic("database error")
  }
  defer db.Close()
	r := gin.Default()
	r = routes.CollectRoute(r)
	panic(r.Run())
}
